package com.ff.xyh.feign.client.post;

import com.ff.xyh.common.entity.post.PostDelete;
import com.ff.xyh.common.entity.result.ResultObject;
import com.ff.xyh.common.qo.post.PostDeleteQuery;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Auther FF
 * @Date 2022年 11月 15日
 * @Time 18:13
 */
@FeignClient(value = "service-post", contextId = "PostDeleteClient")
@RequestMapping("/post-service")
public interface PostDeleteClient {

    @GetMapping("get-post-delete-all")
    ResultObject getAllPostDelete() ;

    @PostMapping("get-post-delete-page")
    ResultObject getPostDeletePage (
            @RequestParam(name = "current") long currentPage,
            @RequestParam(name = "size") long size) ;

    /**
     * 条件查询
     * @param postDeleteQuery
     * @return
     */
    @PostMapping("get-post-delete-condition")
    ResultObject getPostDeleteCondition(
            @RequestBody PostDeleteQuery postDeleteQuery) ;

    @GetMapping("get-post-delete-postId-postType")
    ResultObject getPostDeleteByPostIdAndPostType(
            @RequestParam(name = "postId") String postId,
            @RequestParam(name = "postType") Integer postType) ;

    @GetMapping("delete-post-delete-postId-postType")
    ResultObject deletePostDeleteByPostIdAndPostType(
            @RequestParam(name = "postId") String postId,
            @RequestParam(name = "postType") Integer postType) ;

    @PostMapping("insert-post-delete")
    ResultObject insertPostDelete (
            @RequestBody PostDelete postDelete) ;

    @PostMapping("update-post-delete")
    ResultObject updatePostDelete(
            @RequestBody PostDelete postDelete) ;
}
